import requests
import re


def get_list_info():
    url = "http://www.weather.com.cn/weather1d/101180101.shtml"
    response = requests.get(url)
    response.encoding = "utf-8"
    # print("response", response)
    text = response.text
    # print("text", text)
    # https://www.manongjc.com/detail/27-fpaxpmidbyloaiw.html 参考的正则表达式
    # nameList = re.findall('<span class="name">([\u4e00-\u9fa5]*)</span>', text)
    nameList = re.findall('<span class="name">(.*?)</span>', text)
    weather_list = re.findall('<span class="weather">(.*?)</span>', text)
    wd_list = re.findall('<span class="wd">(.*?)</span>', text)
    zs_list = re.findall('<span class="zs">(.*?)</span>', text)
    lst = []
    for name, weather, wd, zs in zip(nameList, weather_list, wd_list, zs_list):
        lst.append([name, weather, wd, zs])
    return lst
